<!DOCTYPE html>
<html>

<head>
    <title>SQL Tools</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="js/index.js"></script>
</head>

<body class="container" style="padding:10px 0">
<form role="form" id="form">
    <!-- 输入区域 -->
    <div class="form-group">
        <textarea id="txt_content" name="content" class="form-control" rows="20"
                  placeholder="CREATE TABLE... or public class JavaObject {}" required="required"></textarea>
    </div>

    <!-- 下拉列表 -->
    <div class="form-group">
        <select class="form-control" name="operation" id="sel_operation">
            <option value="sql_to_java_obj">SQL转Java对象</option>
            <option value="sql_to_dao_def">SQL转DAO类</option>
        </select>
    </div>

    <!--选项 -->
    <div class="form-group">
        <button type="reset" class="btn btn-warning col-md-2" id="btn_reset" onclick="clearAll()"><span
                class="glyphicon glyphicon-refresh"></span>清空所有
        </button>
        <button type="button" class="btn btn-primary col-md-2" id="btn_submit" onclick="convertSql2Obj()"><span
                class="glyphicon glyphicon-hand-right"></span>解析输入
        </button>
        <button type="button" style="float:right" class="btn btn-success col-md-2" id="btn_download" onclick="download()"><span
                class="glyphicon glyphicon-download"></span>下载结果
        </button>
    </div>

    <!-- 结果展示 -->
    <div class="form-group">
        <textarea name="output" class="form-control" rows="20" id="txt_output"></textarea>
    </div>

    <!--隐藏的输入框，用于保存object name -->
    <input type="hidden" id="txt_object_name"/>
</form>
</body>

</html>